1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How can I update all of my software ?

Discussion in 'Installation and Maintenance of Ports or Packages' started by chuugar, Jul 13, 2011.

  1. chuugar

    chuugar New Member

    Messages:
    4
    Thanks Received:
    0
    Hi guys !

    So... It is my first message on this forum. :)
    Well, I'm a new FreeBSD user (I have got a dual boot with Linux), so I am sorry if my question seems to be... stupid.
    How can I update all of my software/dependency ? Because, when I tried to install whatever I need to update 2 or 3 dependency...

    I wish I can already say thank you. ;)
    (I am French)
     
  2. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,515
    Thanks Received:
    2,351
  3. DutchDaemon

    DutchDaemon Administrator Staff Member Administrator Moderator

    Messages:
    10,721
    Thanks Received:
    2,137
    Given the subforum this was posted in, I'm assuming this is about ports/packages?

    chuugar, you are aware of the strict separation between the base system (FreeBSD kernel and FreeBSD userland) and add-on software (third-party applications, i.e. ports and packages), which are not updated together?

    BSD vs Linux

    The aforementioned Chapter 24 covers both, but make sure you understand the difference.
     
  4. chuugar

    chuugar New Member

    Messages:
    4
    Thanks Received:
    0
    No, I am not.
    I think that what I have to update is not the kernel, but the applications...
    I am going to read the handbook.
     
  5. wblock@

    wblock@ Administrator Staff Member Administrator Moderator Developer

    Messages:
    11,503
    Thanks Received:
    2,212
  6. chuugar

    chuugar New Member

    Messages:
    4
    Thanks Received:
    0
    I did that:
    Code:
    portsnap update


    And FreeBSD returns me:
    Code:
    Ports tree is already up to date


    What I have to do more ??
     
  7. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,515
    Thanks Received:
    2,351
    Read /usr/ports/UPDATING and see which of the ports are out of date.

    # pkg_version -vI
     
  8. chuugar

    chuugar New Member

    Messages:
    4
    Thanks Received:
    0
    A lot of my ports are out of date.
    Must I update all of them manually ?
     
  9. wblock@

    wblock@ Administrator Staff Member Administrator Moderator Developer

    Messages:
    11,503
    Thanks Received:
    2,212
    That's a link in post #5.
     
  10. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,515
    Thanks Received:
    2,351
    Which is why you really shouldn't install any of the packages on the CD/DVDs. By the time you get to install the system they'll all be out of date.
     
  11. fender0107401

    fender0107401 Member

    Messages:
    303
    Thanks Received:
    10
    Read the FreeBSD Handbook.

    Read this.

    More specifically, read this for your current question.

    More and more specifically, read this.
     
  12. vb

    vb New Member

    Messages:
    5
    Thanks Received:
    0
    portsnap fetch update
    portupgrade -u -a
     
  13. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,515
    Thanks Received:
    2,351
    Don't! Read the link in post #5.
     
  14. vermaden

    vermaden Well-Known Member

    Messages:
    2,361
    Thanks Received:
    677
    (dependencies)
    Code:
    # pkg_add -r portmaster
    # pkg_add -r portaudit


    I use two aliases for packages/ports updates:

    Code:
    alias ports-check="portsnap fetch update; portmaster -L --index-only | grep -i ' new '; portaudit -Fda; pkg_updating -d $( ls -ltr -D '%Y%m%d' /var/db/pkg | awk 'END{print $6}' )"
    alias ports-update="portmaster -y --no-confirm -a --packages-if-newer -m 'BATCH=yes' -d; portmaster --check-depends"


    example output(s):
    Code:
    # ports-check                                
    Looking up portsnap.FreeBSD.org mirrors... 5 mirrors found.
    Fetching snapshot tag from portsnap5.freebsd.org... done.
    Fetching snapshot metadata... done.
    Updating from Mon Jul 18 11:28:48 CEST 2011 to Mon Jul 18 12:16:56 CEST 2011.
    Fetching 3 metadata patches.. done.
    Applying metadata patches... done.
    Fetching 0 metadata files... done.
    Fetching 1 patches. done.
    Applying patches... done.
    Fetching 0 new ports or files... done.
    Removing old files and directories... done.
    Extracting new files:
    /usr/ports/sysutils/bsdadminscripts/
    Building new INDEX files... done.
            ===>>> New version available: bsdadminscripts-6.1.1_1
            ===>>> 1 has a new version available
    auditfile.tbz                                 100% of   68 kB   59 kBps
    New database installed.
    Database created: Mon Jul 18 12:35:00 CEST 2011
    0 problem(s) in your installed packages found.



    Code:
    # ports-update 
    ===>>> Starting check of installed ports for available updates
    ===>>> Launching child to update bsdadminscripts-6.1.1 to bsdadminscripts-6.1.1_1
    
    ===>>> Port directory: /usr/ports/sysutils/bsdadminscripts
    
    ===>>> Gathering dependency list for sysutils/bsdadminscripts from ports
    ===>>> No dependencies for sysutils/bsdadminscripts
    ===>>> Returning to update check of installed ports
    
            ===>>> The sysutils/libgksuui port moved to sysutils/libgksu
            ===>>> Reason: Removed: It is a part of sysutils/libgksu now
    
    ===>>> Launching child to reinstall libgksuui-1.0.7_6
    
            ===>>> The sysutils/libgksuui port moved to sysutils/libgksu
            ===>>> Reason: Removed: It is a part of sysutils/libgksu now
    
    ===>>> Port directory: /usr/ports/sysutils/libgksu
    
    ===>>> Gathering dependency list for sysutils/libgksu from ports
    ===>>> Dependency check complete for sysutils/libgksu
    ===>>> Returning to update check of installed ports
    ===>>> Starting build and/or install for for ports that need updating <<<===
    
    ===>>> Launching child to install sysutils/bsdadminscripts
    
    ===>>> Port directory: /usr/ports/sysutils/bsdadminscripts
    
    ===>>> Checking package repository for latest available version
    
    ===>>> The newest available package (bsdadminscripts-6.1.1)
           is not newer than the installed version (bsdadminscripts-6.1.1)
    
    ===>>> There is no valid package to install, building port instead
    
    ===>>> Starting check for build dependencies
    ===>>> Gathering dependency list for sysutils/bsdadminscripts from ports
    ===>>> No dependencies for sysutils/bsdadminscripts
    ===>  Cleaning for bsdadminscripts-6.1.1_1
    
    ===>  License check disabled, port has not defined LICENSE
    => bsdadminscripts-6.1.1.tar.gz doesn't seem to exist in /usr/ports/distfiles//.
    => Attempting to fetch http://heanet.dl.sourceforge.net/project/bsdadminscripts/bsdadminscripts/bsdadminscripts-6.1.1.tar.gz
    bsdadminscripts-6.1.1.tar.gz                  100% of   72 kB  220 kBps
    ===>  Extracting for bsdadminscripts-6.1.1_1
    => SHA256 Checksum OK for bsdadminscripts-6.1.1.tar.gz.
    ===>  Patching for bsdadminscripts-6.1.1_1
    ===>  Applying FreeBSD patches for bsdadminscripts-6.1.1_1
    ===>  Configuring for bsdadminscripts-6.1.1_1
    
    ===>>> Creating a backup package for old version bsdadminscripts-6.1.1
    
    ===>>> Starting check for runtime dependencies
    ===>>> Gathering dependency list for sysutils/bsdadminscripts from ports
    ===>>> No dependencies for sysutils/bsdadminscripts
    ===>  Installing for bsdadminscripts-6.1.1_1
    ===>   Generating temporary packing list
    ===>  Checking if sysutils/bsdadminscripts already installed
    installing: /usr/local/man/man1/bsdadminscripts.1.gz
    installing: /usr/local/share/bsdadminscripts/buildflags.awk
    installing: /usr/local/etc/buildflags.conf.sample
    installing: /usr/local/share/bsdadminscripts/buildflags.mk
    installing: /usr/local/man/man1/buildflags.awk.1.gz
    installing: /usr/local/man/man1/buildflags.conf.1.gz
    installing: /usr/local/man/man1/buildflags.mk.1.gz
    installing: /usr/local/sbin/distviper
    installing: /usr/local/man/man1/distviper.1.gz
    installing: /usr/local/sbin/pkg_libchk
    installing: /usr/local/man/man1/pkg_libchk.1.gz
    installing: /usr/local/sbin/pkg_upgrade
    installing: /usr/local/man/man1/pkg_upgrade.1.gz
    installing: /usr/local/sbin/pkg_validate
    installing: /usr/local/man/man1/pkg_validate.1.gz
    installing: /usr/local/sbin/portconfig
    installing: /usr/local/man/man1/portconfig.1.gz
    installing: /usr/local/sbin/rcstart
    installing: /usr/local/man/man1/rcstart.1.gz
    installing: /usr/local/sbin/uma
    installing: /usr/local/man/man1/uma.1.gz
    installing: /usr/local/etc/uma.conf.sample
    hardlinking: /usr/local/sbin/rcstart -> /usr/local/sbin/rcstatus
    hardlinking: /usr/local/sbin/rcstart -> /usr/local/sbin/rcstop
    hardlinking: /usr/local/sbin/rcstart -> /usr/local/sbin/rcrestart
    hardlinking: /usr/local/sbin/rcstart -> /usr/local/sbin/rconestart
    hardlinking: /usr/local/sbin/rcstart -> /usr/local/sbin/rconestatus
    hardlinking: /usr/local/sbin/rcstart -> /usr/local/sbin/rconestop
    hardlinking: /usr/local/sbin/rcstart -> /usr/local/sbin/rconerestart
    hardlinking: /usr/local/sbin/portconfig -> /usr/local/sbin/portbuild
    hardlinking: /usr/local/sbin/portconfig -> /usr/local/sbin/portclean
    hardlinking: /usr/local/sbin/portconfig -> /usr/local/sbin/portfetch
    hardlinking: /usr/local/sbin/portconfig -> /usr/local/sbin/portpackage
    hardlinking: /usr/local/sbin/portconfig -> /usr/local/sbin/portconfig-recursive
    hardlinking: /usr/local/sbin/portconfig -> /usr/local/sbin/portfetch-recursive
    ===>   Registering installation for bsdadminscripts-6.1.1_1
    ===>  Cleaning for bsdadminscripts-6.1.1_1
    
    ===>>> Upgrade of bsdadminscripts-6.1.1 to bsdadminscripts-6.1.1_1 succeeded
    
    ===>>> Returning to update check of installed ports
    
    ===>>> Launching child to install sysutils/libgksu
    
    ===>>> Port directory: /usr/ports/sysutils/libgksu
    
    ===>>> Checking package repository for latest available version
    
    ===>>> Creating a backup package for old version libgksu-2.0.9
    pkg_delete: package 'libgksu-2.0.9' is required by these other packages
    and may not be deinstalled (but I'll delete it anyway):
    gnochm-0.9.11_6
    py27-gnome-extras-2.25.3_11
    
    ===>>> Starting check for runtime dependencies
    ===>>> Gathering dependency list for sysutils/libgksu from ports
    ===>>> Dependency check complete for sysutils/libgksu
    ===>>> Installing package
    
    ===>>> Updating dependencies for libgksu-2.0.9 to match installed versions
    ===>>> Updating dependency entry for libgksu-2.0.9 in each dependent port
    ===>>> Re-installation of libgksu-2.0.9 succeeded
    
    ===>>> Returning to update check of installed ports
    
    ===>>> Update check of installed ports complete
    
    ===>>> The following actions were performed:
            Upgrade of bsdadminscripts-6.1.1 to bsdadminscripts-6.1.1_1
            Re-installation of libgksu-2.0.9
    
    (...)
    ===>>> Checking libgksu-2.0.9
    ===>>> Checking libgksuui-1.0.7_6
            ===>>> /usr/ports/sysutils/libgksuui does not exist
            ===>>> This port should probably be updated
    ===>>> Checking libglade2-2.6.4_4
    ===>>> Checking libglut-7.4.4
    (...)
    ===>>> Checking pcre-8.12
    ===>>> Checking pdfedit-0.4.5
    ===>>> Checking perl-5.10.1_3
            ===>>> Updating perl-5.10.1_3/+REQUIRED_BY
    ===>>> Checking perl-5.12.3
    ===>>> Checking perl-5.12.4
    (...)
     
  15. Kiiski

    Kiiski New Member

    Messages:
    63
    Thanks Received:
    14
    Of course there is always many ways to do things, but these aliases don't seem to contain checking /usr/ports/UPDATING. But that is cladly covered in earlier posts.

    Some examples of easing that is covered at least in this thread:
    http://forums.freebsd.org/showthread.php?t=25015 in posts #4 and #5.

    If you are planning on using aliases, maybe you could consider adding that example to ports-check alias.
     
    vermaden thanks for this.
  16. vermaden

    vermaden Well-Known Member

    Messages:
    2,361
    Thanks Received:
    677
    @Kiiski

    Added, thanks ;)