Skip to content

Commit 6297417

Browse files
authored
Merge pull request #43 from xcp-ng/doc-update
Doc update
2 parents a303aba + e8c4b7a commit 6297417

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,11 @@ git clone https://github.com/xcp-ng-rpms/xapi.git
100100
# ... Here add your patches ...
101101

102102
# Build.
103-
xcp-ng-dev container build -b 8.2 --rm xapi/
103+
xcp-ng-dev container build --rm xapi/ 8.2
104104
```
105105

106106
**Important switches**
107107

108-
* `-b` / `--branch` allows to select which version of XCP-ng to work on (defaults to the latest known version if not specified).
109108
* `--no-exit` drops you to a shell after the build, instead of closing the container. Useful if the build fails and you need to debug.
110109
* `--rm` destroys the container on exit. Helps preventing containers from using too much space on disk. You can still reclaim space afterwards by running `docker container prune` and `docker image prune`
111110
* `-v` / `--volume` (see *Mounting repos from outside the container* below)
@@ -120,7 +119,7 @@ fully automated.
120119
`%autopatch` in the `%prep` block; add `BuildRequires: quilt`
121120
2. let quilt apply them in a 8.3 buildenv (`quilt` in 8.3 is only in EPEL) and get you a shell:
122121
```sh
123-
xcp-ng-dev container build --rm -b 8.3 --rpmbuild-stage=p -n --enablerepo=epel .
122+
xcp-ng-dev container build --rm --rpmbuild-stage=p -n --enablerepo=epel 8.3
124123
```
125124
3. ask `quilt` to refresh all your patches (alternatively just the one you want)
126125
```sh
@@ -170,5 +169,5 @@ example, if I clone some repos into a directory on my host, say `/work/code/`,
170169
then I can mount it inside the container as follows:
171170

172171
```sh
173-
xcp-ng-dev container shell -b 8.2 -v /work/code:/mnt/repos
172+
xcp-ng-dev container shell -v /work/code:/mnt/repos 8.2
174173
```

src/xcp_ng_dev/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def buildparser():
100100
"Built RPMs and SRPMs will be in RPMS/ and SRPMS/ subdirectories. "
101101
"Any preexisting BUILD, BUILDROOT, RPMS or SRPMS directories will be removed first.")
102102
parser_build.add_argument(
103-
'build_local', nargs='?', default='.',
103+
'source_dir', nargs='?', default='.',
104104
help="Root path where SPECS/ and SOURCES are available. "
105105
"The default is the working directory")
106106
parser_build.add_argument(
@@ -160,7 +160,7 @@ def container(args):
160160
if hasattr(args, 'command') and args.command != []:
161161
docker_args += ["-e", "COMMAND=%s" % ' '.join(args.command)]
162162
if build:
163-
build_dir = os.path.abspath(args.build_local)
163+
build_dir = os.path.abspath(args.source_dir)
164164
docker_args += ["-v", f"{build_dir}:/home/builder/rpmbuild"]
165165
docker_args += ["-e", "BUILD_LOCAL=1"]
166166
print(f"Building directory {build_dir}")

0 commit comments

Comments
 (0)