Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move the repository stage into the repodata file #575

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bin/xbps-checkvers/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ show_usage(const char *prog, bool fail)
" -R, --repository=<url> Append repository to the head of repository list\n"
" -r, --rootdir <dir> Set root directory (defaults to /)\n"
" -s, --show-all List all packages, in the format 'pkgname repover srcver'\n"
" --staged Enable staged packages\n"
"\n [FILES...] Extra packages to process with the outdated\n"
" ones (only processed if missing).\n", prog);
return fail ? EXIT_FAILURE: EXIT_SUCCESS;
Expand Down Expand Up @@ -716,6 +717,7 @@ main(int argc, char **argv)
{ "rootdir", required_argument, NULL, 'r' },
{ "show-all", no_argument, NULL, 's' },
{ "version", no_argument, NULL, 'V' },
{ "staged", no_argument, NULL, 1 },
{ NULL, 0, NULL, 0 }
};

Expand Down Expand Up @@ -763,6 +765,9 @@ main(int argc, char **argv)
case 'V':
printf("%s\n", XBPS_RELVER);
exit(EXIT_SUCCESS);
case 1:
rcv.xhp.flags |= XBPS_FLAG_USE_STAGE;
break;
case '?':
default:
return show_usage(prog, true);
Expand Down
2 changes: 2 additions & 0 deletions bin/xbps-checkvers/xbps-checkvers.1
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ tree and prints version available in repository and srcpkgs with the following f
If any version can't be resolved,
.Em ?
is printed instead.
.It Fl -staged
Enables the use of staged packages from remote repositories.
.It Fl V, Fl -version
Show the version information.
.El
Expand Down
5 changes: 5 additions & 0 deletions bin/xbps-install/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ usage(bool fail)
" This option can be specified multiple times\n"
" -r, --rootdir <dir> Full path to rootdir\n"
" --reproducible Enable reproducible mode in pkgdb\n"
" --staged Enable staged packages\n"
" -S, --sync Sync remote repository index\n"
" -u, --update Update target package(s)\n"
" -v, --verbose Verbose messages\n"
Expand Down Expand Up @@ -118,6 +119,7 @@ main(int argc, char **argv)
{ "version", no_argument, NULL, 'V' },
{ "yes", no_argument, NULL, 'y' },
{ "reproducible", no_argument, NULL, 1 },
{ "staged", no_argument, NULL, 2 },
{ NULL, 0, NULL, 0 }
};
struct xbps_handle xh;
Expand All @@ -138,6 +140,9 @@ main(int argc, char **argv)
case 1:
flags |= XBPS_FLAG_INSTALL_REPRO;
break;
case 2:
flags |= XBPS_FLAG_USE_STAGE;
break;
case 'A':
flags |= XBPS_FLAG_INSTALL_AUTO;
break;
Expand Down
2 changes: 2 additions & 0 deletions bin/xbps-install/xbps-install.1
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ The
and
.Ar repository
package objects are not stored in pkgdb.
.It Fl -staged
Enables the use of staged packages from remote repositories.
.It Fl r , Fl -rootdir Ar dir
Specifies a full path for the target root directory.
.It Fl S , Fl -sync
Expand Down
2 changes: 2 additions & 0 deletions bin/xbps-query/list.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ repo_list_uri(struct xbps_repo *repo)
printf("%5zd %s",
repo->idx ? (ssize_t)xbps_dictionary_count(repo->idx) : -1,
repo->uri);
if (repo->stage && xbps_dictionary_count(repo->stage) > 0)
printf(" (Staged)");
printf(" (RSA %s)\n", repo->is_signed ? "signed" : "unsigned");
if (repo->xhp->flags & XBPS_FLAG_VERBOSE) {
xbps_data_t pubkey;
Expand Down
5 changes: 5 additions & 0 deletions bin/xbps-query/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ usage(bool fail)
" --repository=<url> Enable repository mode and add repository\n"
" to the top of the list. This option can be\n"
" specified multiple times\n"
" --staged Enable staged packages\n"
" --regex Use Extended Regular Expressions to match\n"
" --fulldeptree Full dependency tree for -x/--deps\n"
" -r, --rootdir <dir> Full path to rootdir\n"
Expand Down Expand Up @@ -105,6 +106,7 @@ main(int argc, char **argv)
{ "regex", no_argument, NULL, 0 },
{ "fulldeptree", no_argument, NULL, 1 },
{ "cat", required_argument, NULL, 2 },
{ "staged", required_argument, NULL, 4 },
{ NULL, 0, NULL, 0 },
};
struct xbps_handle xh;
Expand Down Expand Up @@ -213,6 +215,9 @@ main(int argc, char **argv)
case 3:
list_repolock = opmode = true;
break;
case 4:
flags |= XBPS_FLAG_USE_STAGE;
break;
case '?':
default:
usage(true);
Expand Down
2 changes: 2 additions & 0 deletions bin/xbps-query/xbps-query.1
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ and
modes.
.It Fl -fulldeptree
Prints a full dependency tree in the
.It Fl -staged
Enables the use of staged packages from remote repositories.
.Sy show dependencies
mode.
.It Fl r, Fl -rootdir Ar dir
Expand Down
5 changes: 3 additions & 2 deletions bin/xbps-rindex/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ int sign_repo(struct xbps_handle *, const char *, const char *,
int sign_pkgs(struct xbps_handle *, int, int, char **, const char *, bool);

/* From repoflush.c */
bool repodata_flush(struct xbps_handle *, const char *, const char *,
xbps_dictionary_t, xbps_dictionary_t, const char *);
int repodata_flush(const char *repodir, const char *arch,
xbps_dictionary_t index, xbps_dictionary_t stage, xbps_dictionary_t meta,
const char *compression);

#endif /* !_XBPS_RINDEX_DEFS_H_ */
Loading
Loading