Bug 116830 - ports-mgmt/portupgrade - "portsclean -L" threatens to delete base gcc-libs
Summary: ports-mgmt/portupgrade - "portsclean -L" threatens to delete base gcc-libs
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: Sergey Matveychuk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-02 16:10 UTC by clemens fischer
Modified: 2008-01-26 18:30 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description clemens fischer 2007-10-02 16:10:11 UTC
i had read about an incident where someone had used portsclean(1) and
lost the base systems gcc-libs, so i used "portsclean -Li" to clean out
old libs after an upgrade.  the output was:

  # portsclean -Li
  ** /usr/local/lib/gcc-4.2.2/libgcc_s.so.1 is shadowed by /lib/libgcc_s.so.1
          /lib/libgcc_s.so.1      <- ?
          /usr/local/lib/gcc-4.2.2/libgcc_s.so.1  <- gcc-4.2.2_20070927
   --> This may be an undesirable situation
  Delete /lib/libgcc_s.so.1
  OK? [no]

  ** /usr/local/lib/gcc-4.2.2/libstdc++.so.6 is shadowed by /usr/lib/libstdc++.so.6
          /usr/lib/libstdc++.so.6 <- ?
          /usr/local/lib/gcc-4.2.2/libstdc++.so.6 <- gcc-4.2.2_20070927
   --> This may be an undesirable situation
  Delete /usr/lib/libstdc++.so.6
  OK? [no]

  ** /usr/local/lib/gcc-4.2.2/libssp.so.0 is shadowed by /lib/libssp.so.0
          /lib/libssp.so.0        <- ?
          /usr/local/lib/gcc-4.2.2/libssp.so.0    <- gcc-4.2.2_20070927
   --> This may be an undesirable situation
  Delete /lib/libssp.so.0
  OK? [no]

  ** /usr/local/lib/gcc-4.2.2/libobjc.so.2 is shadowed by /usr/lib/libobjc.so.2
          /usr/lib/libobjc.so.2   <- ?
          /usr/local/lib/gcc-4.2.2/libobjc.so.2   <- gcc-4.2.2_20070927
   --> This may be an undesirable situation
  Delete /usr/lib/libobjc.so.2
  OK? [no]

  ** /usr/local/lib/gcc-4.2.2/libgomp.so.1 is shadowed by /usr/lib/libgomp.so.1
          /usr/lib/libgomp.so.1   <- ?
          /usr/local/lib/gcc-4.2.2/libgomp.so.1   <- gcc-4.2.2_20070927
   --> This may be an undesirable situation
  Delete /usr/lib/libgomp.so.1
  OK? [no]

using the default left my system intact:

  # ll /lib/libgcc_s.so.1 /usr/lib/libstdc++.so.6 /lib/libssp.so.0 /usr/lib/libobjc.so.2 /usr/lib/libgomp.so.1
       53 -r--r--r--  1 root  wheel  -   56K Sep 24 18:21 /lib/libgcc_s.so.1
       55 -r--r--r--  1 root  wheel  -  9.5K Sep 24 18:21 /lib/libssp.so.0
  1719349 -r--r--r--  1 root  wheel  -   29K Sep 24 18:21 /usr/lib/libgomp.so.1
  1719378 -r--r--r--  1 root  wheel  -  101K Sep 24 18:21 /usr/lib/libobjc.so.2
  1719371 -r--r--r--  1 root  wheel  -  941K Sep 24 18:21 /usr/lib/libstdc++.so.6

i'm not sure what happens when _not_ using the `-i' switch.  the code
seems to indicate that nothing gets deleted by default.  touching
anything in base should be a non-issue IMO, other than adding or
changing symlinks for compatibility like perl-ports do.

i imaging two solutions:  changing portsclean(1) to never touch files in
base or change the various gcc-ports to rename their libs in order to
rule out these name collisions.  the shadowing of vital libs mentioned
in portscleans output is indeed undesirable, unless the port compilers
hard-code library paths.

so my request is to implement either solution, taking care of the
shadowing issue as well.

Fix: 

i'd advise to always use "portsclean -Li" to let it query interactively
in case libraries with identical names exist in both ports and base.

regards, clemens
How-To-Repeat: 
install ports/lang/gcc42 and watch "portsclean -Li".
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-10-02 22:21:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sem

Over to maintainer
Comment 2 Sergey Matveychuk freebsd_committer freebsd_triage 2007-12-25 12:10:39 UTC
Sure, it's not pleasant behavior. Passed to my TODO list.

-- 
Dixi.
Sem.
Comment 3 Sergey Matveychuk freebsd_committer freebsd_triage 2008-01-08 12:28:17 UTC
State Changed
From-To: open->closed

Fix committed. Thanks.
Comment 4 dfilter service freebsd_committer freebsd_triage 2008-01-08 12:33:43 UTC
sem         2008-01-08 12:33:38 UTC

  FreeBSD ports repository

  Modified files:
    ports-mgmt/portupgrade Makefile 
  Added files:
    ports-mgmt/portupgrade/files patch-bin-portsclean 
  Log:
  - A patch from HEAD: when gcc installed, some libraries may be conflicted
    with system ones. portsclean -Li ask to remove them. No removes by
    default, but we don't want an user remove system libraries just press 'y'
    in portscleanup -Li.
  
  PR:             ports/116830
  Reported by:    clemens fischer <ino-news at spotteswoode.dnsalias.org>
  
  Revision  Changes    Path
  1.244     +1 -0      ports/ports-mgmt/portupgrade/Makefile
  1.4       +19 -0     ports/ports-mgmt/portupgrade/files/patch-bin-portsclean (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 dfilter service freebsd_committer freebsd_triage 2008-01-26 18:29:46 UTC
sem         2008-01-26 18:29:41 UTC

  FreeBSD ports repository

  Modified files:
    ports-mgmt/portupgrade-devel Makefile distinfo 
  Log:
  - Update to 2.4.0
   * many bug fixes
   * now all dependencies run under portupgrade control
   * run 'make config-conditional' and 'make config' with -c and -C options
  
  PR:             ports/116830, ports/115249
  Reported by:    clemens fischer <ino-news@spotteswoode.dnsalias.org>,
                  KOMATSU Shinichiro <koma2@lovepeers.org>,
                  and other
  
  Revision  Changes    Path
  1.252     +1 -1      ports/ports-mgmt/portupgrade-devel/Makefile
  1.176     +3 -3      ports/ports-mgmt/portupgrade-devel/distinfo
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"