]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Replace 'redhat-release' with generic 'system-release'
authorNeal Gompa <ngompa13@gmail.com>
Sun, 6 Aug 2017 04:06:56 +0000 (00:06 -0400)
committerNeal Gompa <ngompa13@gmail.com>
Sun, 6 Aug 2017 04:06:58 +0000 (00:06 -0400)
fedora-release and mageia-release offer generic 'system-release'
Provides that can be used to determine the release version of the
distribution. Derivatives of Fedora (including RHEL) also offer this
generic capability in their distribution release packages.

examples/solv/repoinfo_config_yum.c

index 697bd6d4c2408a0038ceab1325f3b33090de3d69..efccf1e844500c05d5840272bdb743d0a2f2e03b 100644 (file)
@@ -48,7 +48,7 @@ yum_substitute(Pool *pool, char *line)
        
              queue_init(&q);
              rpmstate = rpm_state_create(pool, pool_get_rootdir(pool));
-             rpm_installedrpmdbids(rpmstate, "Providename", "redhat-release", &q);
+             rpm_installedrpmdbids(rpmstate, "Providename", "system-release", &q);
              if (q.count)
                {
                  void *handle;
@@ -62,7 +62,7 @@ yum_substitute(Pool *pool, char *line)
              queue_free(&q);
              if (!releaseevr)
                {
-                 fprintf(stderr, "no installed package provides 'redhat-release', cannot determine $releasever\n");
+                 fprintf(stderr, "no installed package provides 'system-release', cannot determine $releasever\n");
                  exit(1);
                }
            }