Results 1 to 4 of 4

Thread: Script logic help - dup vs up on Tumbleweed after adding community repo

  1. #1

    Default Script logic help - dup vs up on Tumbleweed after adding community repo

    I am not sure where to post this, but I am hoping this is the place.

    To get to the point, I am doing some bash scripts/scripting and the part I am on now involves (based on what the user selects) adding a community repo. There is support for Leap 15, 15.1 (i think ..) and TW with this repo.

    The coding is not a problem, it's the logic ... I have
    Code:
     sudo zypper ar -f -p 90 <Repo Link here>
    ... I WANT the repo to have a higher priority and updates for specific packages to come from the repo.

    I would think adding the repo with the lower number would do this but here is the thing ... I am testing TW at the moment and I think the advice is "do 'sudo zypper dup', not 'up' on Tumbleweed" ... the packages are seen with "dup" but not changed .. it seems that with "zypper up" (after the repo is added) the packages would be updated, with the new versions being pulled in from that repo, like i want.

    I am worried this is bad practice or something ... .OR say if it's a one time "up" just after I add that repo and ref, that is fine ... again it's not the coding I am having issues with, I just dont want to do something that is bad practice "logic wise"

    thank you for any advice in advance

  2. #2

    Default Re: Script logic help - dup vs up on Tumbleweed after adding community repo

    Sorry about this but i think i may have figured it out already ... https://en.opensuse.org/Additional_package_repositories

    Code:
    zypper dup --from <repoName here> --allow-vendor-change
    may be what i was looking for

    also i see i can combine the f and p in my earlier post to -fp

  3. #3

    Default Re: Script logic help - dup vs up on Tumbleweed after adding community repo

    on that note ....and the fact that I want to "templify" as much as my code as possible ... would it be the same exact thing with "dup" on that second post of mine replaced with "up" for the Leap versions?

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,923
    Blog Entries
    2

    Default Re: Script logic help - dup vs up on Tumbleweed after adding community repo

    There is a Development forum where scripting is discussed...

    https://forums.opensuse.org/forumdis...ming-Scripting

    As for your central question,

    - Yes, TW should always "zypper dup" and not "zypper up"
    - Repo priority may not be enough and setting repo priiority to something custom is highly discouraged. You can "zypper dup --from repo" to apply repo affinity. Do not "allow vendor change" -- AFAIK it's not necessary and could screw up things.
    - All things being equal, package version enumeration would by default try to install the latest version of a package, no matter what repo it may be from.

    I've posted some useful zypper related commands which can be used in BASH scripts...Including a way to detect the OS and then automatically use that to build the correct URL for the repo for that distro version, so for example it would be possible to use my code to write a single install script that works on any TW, LEAP and a number of openSUSE versions prior to LEAP.

    https://en.opensuse.org/User:Tsu2/BASH_zypper

    Tony
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •