Bug 16621 - emulators/linux_base needs to be installed twice
Summary: emulators/linux_base needs to be installed twice
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Marcel Moolenaar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-02-10 00:30 UTC by Mikhail Teterin
Modified: 2000-11-21 07:39 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Teterin 2000-02-10 00:30:00 UTC
	Installing the port for the first time consistently fails
	for me on 4.0 and 3.4 machines:

===>   linux_base-6.1 depends on executable: rpm - found
setup-2.0.5-1.noarch.rpm
filesystem-1.3.5-1.noarch.rpm
basesystem-6.0-4.noarch.rpm
ldconfig-1.9.5-15.i386.rpm
glibc-2.1.2-11.i386.rpm
termcap-9.12.6-15.i386.rpm
libtermcap-2.0.8-18.i386.rpm
bash-1.14.7-16.i386.rpm
ncurses-4.2-25.i386.rpm
zlib-1.1.3-5.i386.rpm
info-3.12h-2.i386.rpm
execution of script failed
error: /usr/ports/distfiles/rpm/info-3.12h-2.i386.rpm cannot be installed
*** Error code 1

Stop in /3/ports/emulators/linux_base.

[...]

If I simply repeat ``make install'' again, everything goes smoothly.

How-To-Repeat: 
	Try installing the port on a machine for the first time.
Comment 1 Michael Haro freebsd_committer freebsd_triage 2000-02-15 02:42:48 UTC
Responsible Changed
From-To: freebsd-ports->marcel

Over to maintainer 

Comment 2 marcel 2000-02-15 03:18:30 UTC
Hi Mikhail,

The port doesn't fail on bento.freebsd.org. Neither for -current nor for
-stable. AFAICT, this means that the port is basicly all right. Can you
tell me more about your machines, specifically wrt to anything that has
any relation to GNU info.

-- 
Marcel Moolenaar
  mail: marcel@cup.hp.com / marcel@FreeBSD.org
  tel:  (408) 447-4222
Comment 3 FUJISHIMA Satsuki 2000-04-29 07:33:40 UTC
|>Description:
|	Installing the port for the first time consistently fails
|	for me on 4.0 and 3.4 machines:
|
|===>   linux_base-6.1 depends on executable: rpm - found
|setup-2.0.5-1.noarch.rpm
|filesystem-1.3.5-1.noarch.rpm
|basesystem-6.0-4.noarch.rpm
|ldconfig-1.9.5-15.i386.rpm
|glibc-2.1.2-11.i386.rpm
|termcap-9.12.6-15.i386.rpm
|libtermcap-2.0.8-18.i386.rpm
|bash-1.14.7-16.i386.rpm
|ncurses-4.2-25.i386.rpm
|zlib-1.1.3-5.i386.rpm
|info-3.12h-2.i386.rpm
|execution of script failed
|error: /usr/ports/distfiles/rpm/info-3.12h-2.i386.rpm cannot be installed
|*** Error code 1

Exactly the same thing hits me on both 3.4-STABLE and today's
5.0-CURRENT and I can reproduce it and also have a workaround.

The principle:
Bento often differs from mine in its environment variable.

How to repeat:
/usr/ports/emulators/linux_base# LC_ALL=ja_JP.EUC make install

set LC_ALL variable other than ``C'' and install-info dumps core.

and also verify if this works:
/usr/ports/emulators/linux_base# LC_ALL=C make install

Have the install done without error? fine. Then the workaround is
obvious.

Please test the following patch.

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/emulators/linux_base/Makefile,v
retrieving revision 1.41
diff -u -r1.41 Makefile
--- Makefile	2000/04/12 04:55:31	1.41
+++ Makefile	2000/04/29 06:22:54
@@ -96,6 +96,7 @@
 			xpm-3.4k-1.${MACHINE_ARCH}.rpm
 
 DBPATH=			/var/lib/rpm
+RPM=			env LC_ALL=C rpm
 RPMFLAGS=		--ignoreos --root ${PREFIX} --dbpath ${DBPATH} \
 			--nodeps --replacepkgs
 RPMDIR=			${DISTDIR}/${DIST_SUBDIR}
@@ -137,7 +138,7 @@
 	fi
 	@${MKDIR} ${PREFIX}/${DBPATH}
 	@${MKDIR} ${PREFIX}/var/tmp
-	@rpm --initdb --root ${PREFIX} --dbpath ${DBPATH}
+	@${RPM} --initdb --root ${PREFIX} --dbpath ${DBPATH}
 #
 # Make sure we have a /dev/null in the chrooted environment.
 #
@@ -155,30 +156,30 @@
 #
 	@for R in ${RPM_SET1}; do \
 		${ECHO} $$R; \
-		rpm -U ${RPMFLAGS} ${RPMDIR}/$$R; \
+		${RPM} -U ${RPMFLAGS} ${RPMDIR}/$$R; \
 	done
 	@${ECHO} ${RPM_LDCONFIG}
-	@rpm -U ${RPMFLAGS} --noscripts ${RPMDIR}/${RPM_LDCONFIG}
+	@${RPM} -U ${RPMFLAGS} --noscripts ${RPMDIR}/${RPM_LDCONFIG}
 	@brandelf -t Linux ${PREFIX}/sbin/ldconfig
 	@${PREFIX}/sbin/ldconfig
 	@${TOUCH} ${PREFIX}/etc/ld.so.conf
 	@for R in ${RPM_SET2}; do \
 		${ECHO} $$R; \
-		rpm -U ${RPMFLAGS} ${RPMDIR}/$$R; \
+		${RPM} -U ${RPMFLAGS} ${RPMDIR}/$$R; \
 	done
 	@${ECHO} ${RPM_RPM}
-	@rpm -U ${RPMFLAGS} --noscripts ${RPMDIR}/${RPM_RPM}
+	@${RPM} -U ${RPMFLAGS} --noscripts ${RPMDIR}/${RPM_RPM}
 	@brandelf -t Linux ${PREFIX}/bin/rpm
 	@for R in ${RPM_SET3}; do \
 		${ECHO} $$R; \
-		rpm -U ${RPMFLAGS} ${RPMDIR}/$$R; \
+		${RPM} -U ${RPMFLAGS} ${RPMDIR}/$$R; \
 	done
 #
 # Install updates
 #
 	@for R in ${PATCHFILES}; do \
 		${ECHO} $$R; \
-		rpm -U ${RPMFLAGS} ${RPMDIR}/$$R; \
+		${RPM} -U ${RPMFLAGS} ${RPMDIR}/$$R; \
 	done
 #
 # Install yp.conf as a hint to NIS users

I suppose you have much cleaner way to solve this. :)

-- 
FUJISHIMA Satsuki
Comment 4 Mikhail Teterin 2000-04-29 22:55:50 UTC
This may be it, for my LANG is set to ru_SU.KOI8-R on all of the machines.
(Too bad, there is no Ukrainian locale yet...).

[....]
=Bento often differs from mine in its environment variable.
=
=How to repeat:
=/usr/ports/emulators/linux_base# LC_ALL=ja_JP.EUC make install
=
=set LC_ALL variable other than ``C'' and install-info dumps core.
[....]

	-mi
Comment 5 FUJISHIMA Satsuki 2000-05-02 17:38:45 UTC
At Sat, 29 Apr 2000 17:55:50 -0400 (EDT),
Mikhail Teterin <mi@kot.ne.mediaone.net> wrote:
> 
> This may be it, for my LANG is set to ru_SU.KOI8-R on all of the machines.
> (Too bad, there is no Ukrainian locale yet...).

That is exactly what I intended. Have you tried my patch?
Setting LC_ALL=C temporarily during you run rpm doesn't hurt your
environment, it only affects under ``make'' you just typed.

-- 
FUJISHIMA Satsuki
Comment 6 Mikhail Teterin 2000-05-02 19:32:09 UTC
On  3 May, FUJISHIMA Satsuki wrote:
= At Sat, 29 Apr 2000 17:55:50 -0400 (EDT),
= Mikhail Teterin <mi@kot.ne.mediaone.net> wrote:
= > 
= > This may be it, for my LANG is set to ru_SU.KOI8-R on all of the machines.
= > (Too bad, there is no Ukrainian locale yet...).
= 
= That is exactly what I intended. Have you tried my patch?

No, all of my machines already have Linux "subsytem" installed. And
it seems too simple to worry, that it will be different for me then
it is for you :)

= Setting LC_ALL=C temporarily during you run rpm doesn't hurt your
= environment, it only affects under ``make'' you just typed.

I agree. And if that's the fix -- I'm all for it, although it looks
more like a workaround... :) I'd say, commit it, but don't close the
PR until we find out what's really wrong there.

	-mi
Comment 7 Marcel Moolenaar freebsd_committer freebsd_triage 2000-11-21 07:38:49 UTC
State Changed
From-To: open->closed

Patch committed. Thanks!