Ticket #597 (closed defect: fixed)

Opened 21 months ago

Last modified 9 months ago

Paludis picks up the wrong USE flag with -E portage

Reported by: chutz Owned by:
Priority: Sometime Milestone:
Component: clients/paludis Version: 0.26.2
Keywords: Cc:
Blocked By: Blocking: #611
Distribution: Gentoo

Description

Paludis with -E portage is trying to install gcc with USE=fortran. The only way to get around it is to specify "sys-devel/gcc -fortran" in /etc/portage/package.use.

I have both paludis and portage installed.

I have:

USE="... -fortran ..."

in /etc/make.conf

*/* ... -fortran ...

in /etc/paludis/use.conf

I don't have anything else mentioning "fortran" in the above two files or /etc/portage/package.use

# emerge -pv gcc
These are the packages that would be merged, in order:

Calculating dependencies -... done!
[ebuild   R   ] sys-devel/gcc-4.1.2  USE="(-altivec) -bootstrap -build -d -doc -fortran -gcj -gtk (-hardened) -ip28 -ip32r10k -libffi mudflap (-multilib) -multislot (-n32) (-n64) nls -nocxx -objc -objc++ -objc-gc -test -vanilla" 38,847 kB

Total: 1 package (1 reinstall), Size of downloads: 38,847 kB
# paludis -pi gcc
Building target list...
Building dependency list...

These packages will be installed:

* sys-devel/gcc :4.1 [R 4.1.2] <target>
    (-altivec) -bootstrap -build -d -doc -fortran -gcj -gtk (-hardened) -ip28 -ip32r10k -libffi mudflap (-multilib) -multislot (-n32) (-n64) nls -nocxx -objc -objc++ -objc-gc -test -vanilla
    37.94 MBytes to download

Total: 1 package (1 rebuild), 37.94 MBytes to download
# paludis -E portage -pi gcc
Building target list...
Building dependency list...

These packages will be installed:

* dev-libs/mpfr [N 2.3.1]
    Reasons: *sys-devel/gcc-4.1.2:4.1::gentoo
    "library for multiple-precision floating-point computations with exact rounding"
    868.09 kBytes to download
* sys-devel/gcc :4.1 [R 4.1.2] <target>
    (-altivec) -bootstrap -build -d -doc fortran* -gcj -gtk (-hardened) -ip28 -ip32r10k -libffi mudflap (-multilib) -multislot (-n32) (-n64) nls -nocxx -objc -objc++ -objc-gc -test -vanilla
    37.94 MBytes to download

Total: 2 packages (1 new, 1 rebuild), 38.78 MBytes to download

Use flags:

* fortran:         Adds support for fortran (formerly f77)

Attachments

make.conf Download (3.3 KB) - added by chutz 21 months ago.
make.conf

Change History

  Changed 21 months ago by ciaranm

Please attach complete Portage configs.

Changed 21 months ago by chutz

make.conf

  Changed 21 months ago by chutz

Attached /etc/make.conf and here is the simplified portage configuration for this testcase:

possum ~ # eselect profile show
Current make.profile symlink:
  /var/repos/gentoo/profiles/default-linux/amd64/2007.0

possum ~ # ls -l /etc/portage
ls: cannot access /etc/portage: No such file or directory

possum ~ # emerge -pv gcc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sys-devel/gcc-4.1.2  USE="(-altivec) -bootstrap -build -d -doc -fortran -gcj -gtk (-hardened) -ip28 -ip32r10k -libffi mudflap (-multilib) -multislot (-n32) (-n64) nls -nocxx -objc -objc++ -objc-gc -test -vanilla" 38,847 kB

Total: 1 package (1 reinstall), Size of downloads: 38,847 kB

possum ~ # paludis -E portage -pi sys-devel/gcc  --dl-upgrade as-needed
paludis@1213252875: [WARNING portage_environment.dodgy] Use of Portage configuration files will lead to sub-optimal performance and loss of functionality. Full support for Portage configuration formats is not guaranteed; issues should be reported via trac.
Building target list...
Building dependency list...

These packages will be installed:

* dev-libs/mpfr [N 2.3.1]
    Reasons: *sys-devel/gcc-4.1.2:4.1::gentoo
    "library for multiple-precision floating-point computations with exact rounding"
    868.09 kBytes to download
* sys-devel/gcc :4.1 [R 4.1.2] <target>
    (-altivec) -bootstrap -build -d -doc fortran* -gcj -gtk (-hardened) -ip28 -ip32r10k -libffi mudflap (-multilib) -multislot (-n32) (-n64) nls -nocxx -objc -objc++ -objc-gc -test -vanilla
    37.94 MBytes to download

Total: 2 packages (1 new, 1 rebuild), 38.78 MBytes to download

Use flags:

* fortran:         Adds support for fortran (formerly f77)
paludis@1213252876: [WARNING portage_environment.dodgy] Use of Portage configuration files will lead to sub-optimal performance and loss of functionality. Full support for Portage configuration formats is not guaranteed; issues should be reported via trac.

 * No unread news items found

follow-up: ↓ 4   Changed 21 months ago by ciaranm

Hrm. Does this fix it?

--- a/paludis/environments/portage/portage_environment.cc
+++ b/paludis/environments/portage/portage_environment.cc
@@ -499,9 +499,10 @@ PortageEnvironment::query_use(const UseFlagName & f, const PackageID & e) const
         state = (*e.repository())[k::use_interface()]->query_use(f, e);

     /* check use: general user config */
-    std::set<std::string>::const_iterator u(_imp->use_with_expands.find(stringify(f)));
-    if (u != _imp->use_with_expands.end())
+    if (_imp->use_with_expands.find(stringify(f)) != _imp->use_with_expands.end())
         state = use_enabled;
+    else if (_imp->use_with_expands.find("-" + stringify(f)) != _imp->use_with_expands.end())
+        state = use_disabled;

     /* check use: per package config */
     for (PackageUse::const_iterator i(_imp->package_use.begin()), i_end(_imp->package_use.end()) ;

in reply to: ↑ 3   Changed 21 months ago by chutzimir

Replying to ciaranm:

Hrm. Does this fix it?

Thanks for the effort, Ciaran, but it did not make any difference. :(

  Changed 21 months ago by ciaranm

  • blocking 611 added

  Changed 21 months ago by ciaranm

  • status changed from new to closed
  • resolution set to fixed

3723adb / ca239ee0

Fairly sure that works.

Note: See TracTickets for help on using tickets.